<?php
class sfValidatorDateWithWeek extends sfValidatorDate   {


	protected function doClean($value)
	{
		if( $value == null || !is_array($value) ){
			$value = array();
		}

		if(
		  empty($value['week']) || empty($value['month']) || empty($value['year'])
		){
			throw new sfValidatorError($this, 'invalid', array('value' => $value));
		}else{
			//$value['week'] = date('W')
			return weekNumberToDateRange($value['week'] , $value['month'] , $value['year']);
		}
	}


}
